home *** CD-ROM | disk | FTP | other *** search
- // this works for me with Turboc, Borland C++ 3.0 & 3.1
-
- /* ---------------------- shell_out() ----------------- November 24,1992 */
- void shell_out(void)
- {
- char *s;
- int disk;
- char path[90];
-
- s=getenv("COMSPEC");
-
- if ( s )
- {
- disk=getdisk();
- getcurdir(disk+1, path);
-
- /* shell out */
- home();
- printf("DOS Shell - Type \"EXIT\" & Press ENTER to return to ICETERM\n");
- spawnl(P_WAIT, s, "ha", NULL);
-
- setdisk(disk);
- sprintf(gb_util_str, "\\%s", path);
- chdir(gb_util_str);
- }
- else
- {
- printf"ERROR COMSPEC not Found\n");
- // you could add more code to look a little harder for comamnd.com
- }
- }
-